package io;

import java.io.File;

public class IODemo3 {
    public static void main(String[] args) throws InterruptedException {
        File file = new File("./test.txt");
        //boolean ret = file.delete();
        //进程结束后再进行删除
        //作用：给你实时编辑的内容进行保存，防止你编辑一半，电脑突然断电的情况
        file.deleteOnExit();
        Thread.sleep(5000);
      //  System.out.println(ret);
    }
}
